package com.ruoyi.dgw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dgw.mapper.VaccineApplicatMapper;
import com.ruoyi.dgw.domain.VaccineApplicat;
import com.ruoyi.dgw.service.IVaccineApplicatService;

/**
 * 疫苗申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-17
 */
@Service
public class VaccineApplicatServiceImpl implements IVaccineApplicatService 
{
    @Autowired
    private VaccineApplicatMapper vaccineApplicatMapper;

    /**
     * 查询疫苗申请
     * 
     * @param id 疫苗申请主键
     * @return 疫苗申请
     */
    @Override
    public VaccineApplicat selectVaccineApplicatById(Long id)
    {
        return vaccineApplicatMapper.selectVaccineApplicatById(id);
    }

    /**
     * 查询疫苗申请列表
     * 
     * @param vaccineApplicat 疫苗申请
     * @return 疫苗申请
     */
    @Override
    public List<VaccineApplicat> selectVaccineApplicatList(VaccineApplicat vaccineApplicat)
    {
        return vaccineApplicatMapper.selectVaccineApplicatList(vaccineApplicat);
    }

    /**
     * 新增疫苗申请
     * 
     * @param vaccineApplicat 疫苗申请
     * @return 结果
     */
    @Override
    public int insertVaccineApplicat(VaccineApplicat vaccineApplicat)
    {
        return vaccineApplicatMapper.insertVaccineApplicat(vaccineApplicat);
    }

    /**
     * 修改疫苗申请
     * 
     * @param vaccineApplicat 疫苗申请
     * @return 结果
     */
    @Override
    public int updateVaccineApplicat(VaccineApplicat vaccineApplicat)
    {
        return vaccineApplicatMapper.updateVaccineApplicat(vaccineApplicat);
    }

    /**
     * 批量删除疫苗申请
     * 
     * @param ids 需要删除的疫苗申请主键
     * @return 结果
     */
    @Override
    public int deleteVaccineApplicatByIds(Long[] ids)
    {
        return vaccineApplicatMapper.deleteVaccineApplicatByIds(ids);
    }

    /**
     * 删除疫苗申请信息
     * 
     * @param id 疫苗申请主键
     * @return 结果
     */
    @Override
    public int deleteVaccineApplicatById(Long id)
    {
        return vaccineApplicatMapper.deleteVaccineApplicatById(id);
    }

    /**
     * 审核通过功能
     *
     * @param id
     */
    @Override
    public int updateStatus(Long id,String statusBy) {
       return vaccineApplicatMapper.updateStatus(id,statusBy);
    }
}
